package com.example.asynctaskdemo.okhttp;

import android.app.Activity;

import java.util.Map;

import okhttp3.Request;

/**
 * Created by Kellan on 2016/12/27.
 * 多封装一层，便于以后扩展
 */
public class NetCtrl {

    public static void get(final String url, final String type, final Map<String, String> params, OjjlgHttpRequestCallBack listener) {
        new GetTask( url,type, params, listener).execute();
    }


    public static <T> void post(Activity activity, Class<T> clazz, Request request,
                                boolean isShowDialog, ResultListener<T> lis) {
        new PostTask(activity, clazz, request, isShowDialog, lis).execute();
    }






}
